package org.bw.bookstore.common.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Entity;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;

/**
 *@program: wisdom_bookstore
 *@description: 盘点记录实体类
 *@Author: 孙冬雪
 *@Date: 2020-10-22 09:50
 */
@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
@Entity
@TableName("tb_inventory_record")
public class TbInventoryRecord extends BaseEntity implements Serializable {

    /**
     * inventoryNum: 盘点数量
     **/
    private Integer inventoryNum;

    /**
     * finishTime: 完成时间
     **/
    @DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private Date finishTime;

    /**
     * exceedLack: 超出缺少量
     **/
    private Integer exceedLack;

    /**
     * 工作人员标识
     *
     * @Author 孙冬雪
     * @Date 2020/10/21 15:23
     **/
    private String staffMemberCode;

    /**
     * 一个盘点记录是一个工作人员记录的
     *
     * @Author 孙冬雪
     * @Date 2020/10/21 15:24
     **/
    @Transient
    @TableField(exist = false)
    private TbStaffMember tbStaffMember;

    /**
     * 盘点任务标识
     *
     * @Author 孙冬雪
     * @Date 2020/10/21 15:23
     **/
    private String inventoryTaskCode;

    /**
     * 一个盘点记录对应一个盘点任务
     *
     * @Author 孙冬雪
     * @Date 2020/10/21 15:24
     **/
    @Transient
    @TableField(exist = false)
    private TbInventoryTask tbInventoryTask;

    @Transient
    @TableField(exist = false)
    private String bookName;

    @Transient
    @TableField(exist = false)
    private String realName;

}
